# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=krfb
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/internet/org.kde.krfb"
pkgdesc="Desktop sharing"
license="GPL-3.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtx11extras-dev ki18n-dev kcompletion-dev kconfig-dev kcoreaddons-dev kcrash-dev kdbusaddons-dev kdnssd-dev kdoctools-dev knotifications-dev kwallet-dev kwidgetsaddons-dev kxmlgui-dev xcb-util-dev xcb-util-image-dev libvncserver-dev pipewire-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/krfb-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="91a8281fb6e9756de262fcc02f98863b1ec74a30a2ed6e2a51a73808e293680ac3dbee555af4dd007f9c3ecfd6163c7328cabf4f6cc31fa55932b7db56cad65e  krfb-20.04.3.tar.xz"
